
/**
 * 
 * @author David Baker
 *
 * @version $Revision: 1.0 $
 */

package Server;

/**
 */
public class User {
	
	/**
	 * Field ID.
	 */
	private int iD;

	/**
	 * Field name.
	 */
	protected String name;

	/**
	 * Field password.
	 */
	protected String password;

	/**
	 * Field loggedIn.
	 */
	private boolean loggedIn;
	/**
	 * 
	 */
	
	/**
	 * Constructor for User.
	 * @param n String
	 * @param id int
	 */
	protected User(String n, String p){
		name = n;
		password = p;
		loggedIn = false;
	}
	
	/**
	 * 
	 * @param id
	 */
	public void setID(int id){
		iD = id;
	}
	
	/**
	 * 	
	 * @return String */
	public String toString(){
		final String str = "";	 // $codepro.audit.disable whiteSpaceUsage
		return str;
	}
	
	/**
	 * Method getID.
	
	 * @return int */
	public int getID(){
		return iD;
	}

	/**
	 * Method getName.
	
	 * @return String */
	public String getName() {
		return name;
	}

	/**
	 * Method validate.
	 * @param pwd String
	
	 * @return Boolean */
	public Boolean validate(String pwd) {
		return password.equals(pwd);
	}

	/**
	 * Method setLoggedIn.
	 * @param t boolean
	 */
	public void setLoggedIn(boolean t) {
		loggedIn = t;		
	}
	
	public String getpassword() {
		return password;
	}
	
	public void setPassword(String p) {
		this.password = p;
	}
}
	

